<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@include file="../common/tag.jsp" %>
<c:set var="_underRemote" value="active" scope="request"/>
<c:set var="_pageTitle" value="遥控生成" scope="request"/>
<!DOCTYPE html>
<html>
<head>
	<title>${_pageTitle}</title>
	<%@include file="../common/head.jsp" %>
</head>
<body>
<%@include file="../common/topbar.jsp" %>
<div class="ch-container">
	<div class="row">
		<%@include file="../common/left.jsp" %>
		<!-- main content -->
		<div class="page-header"><h3>${_pageTitle}</h3></div>
		<form id="search_form" action="${basePath}/DataImport/ImportRemoteData"
			  method="post" enctype="multipart/form-data">
			<div class="form-group">
				<label>地区ID：</label>
				<select name="regionId" class="form-control selectWidth">
					<option value="3">欧洲</option>
					<option value="4">北美</option>
					<option value="8">中国</option>
					<option value="10">印度</option>
					<option value="12">泰国</option>
					<option value="13">马来西亚</option>
					<option value="19">中东</option>
					<option value="20">东南亚</option>
					<option value="22">西班牙</option>
					<option value="25">印度尼西亚</option>
				</select>
			</div>
			<div class="form-group">
				<label>文件：</label>
				<input type="file" name="multipartFile"/>
			</div>
			<input type="button" id="importdata" class="btn btn-primary" value="导入"/>
		</form>
		<!-- end main content -->
		<!-- content ends -->

		<c:import url="../common/footer.jsp"/>
			<script type="text/javascript">
                $(document).ready(function() {
                    $("#importdata").click(function() {
                        $("#myform").submit();
                        $("#importdata").val("请稍等");
                        $(this).attr("disabled", "true");
                    });
                    if ("${Msg}" == 1001) {
                        alert("导入成功");
                    } else if ("${Msg}" == 1002) {
                        alert("导入异常，请重试");
                    } else if("${Msg}" == 1003){
                        alert("正在执行，请勿重复提交");
                    }
                });
			</script>